import pymongo

handler = pymongo.MongoClient().chapter_9.rank_data
# 使用find()和sort()方法读取并排序数据
results = handler.find().sort('score', -1)
# 打印结果
for result in results:
    print(result)